#include "ASRandom.h"

NS_AS_BEGIN

#define MULTIPLIER 0x015a4e35
#define INCREMENT  1
unsigned int ASRandom::_iSeed = 1;

void ASRandom::Seed(unsigned int seed)
{
	_iSeed = seed;
}
unsigned int ASRandom::Rand()
{
	_iSeed = MULTIPLIER*_iSeed+INCREMENT;
	_iSeed = (_iSeed>>16)+(_iSeed>>8)+_iSeed;
	return _iSeed;
}

NS_AS_END